﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.master" 
    Inherits="System.Web.Mvc.ViewPage<DCHealthCheck.MvcWeb.Classes.ViewModels.ResultsViewModel>" %>

<%@ Import Namespace="DCHealthCheck.MvcWeb.Classes" %>
<%@ Import Namespace="System.Web.UI" %>
<%@ Import Namespace="DCHealthCheck.DomainModel" %>
<%@ Import Namespace="DCHealthCheck.Common" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <%:Global.ApplicationName%>::<%:Model.ControllerName%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="infobox" style="height: auto">
        <label>
            Domain Controller:
        </label>
        <span>
            <%:Model.Result.DomainController.SamAccountNameFriendly%></span> &nbsp;&nbsp;&nbsp;<label>Date:
            </label>
        <span>
            <%:Model.Result.CheckDateTimeUTC.LongDateFriendly()%>
        </span>
    </div>
    <div id="contents">
        <div id="leftcontainer" style="width: 500px;">
            <h3>
                System Information</h3>
            <div>
                <p>
                    <label for="model.Result.DomainController.OSName">
                        <%: Html.DisplayNameFor(model => model.Result.DomainController.OSName)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.DomainController.OSName)%>
                </p>
                <p>
                    <label for="model.Result.DomainController.OSVersion">
                        <%: Html.DisplayNameFor(model => model.Result.DomainController.OSVersion)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.DomainController.OSVersion)%>
                </p>
                <p>
                    <label for="model.Result.IPAddress">
                        <%: Html.DisplayNameFor(model => model.Result.IPAddress)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.IPAddress)%>
                </p>
                <% if (!string.IsNullOrWhiteSpace(this.Model.Result.IPAddresses))
                   {  %>
                <p>
                    <label for="model.Result.IPAddresses">
                        <%: Html.DisplayNameFor(model => model.Result.IPAddresses)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.IPAddresses)%>
                </p>
                <%} %>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.Manufacturer)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.Manufacturer)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.Model)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.Model)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.SerialNumber)%>:&nbsp;&nbsp;
                    </label>
                    <span style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;" title="<%:Model.Result.SerialNumber%>">
                        <%: Html.DisplayFor(model => model.Result.SerialNumber)%>
                    </span>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.CPUCount)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.CPUCount)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.LogicalCPUCount)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.LogicalCPUCount)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.ProcessCount)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.ProcessCount)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.FreeMemoryMB)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.FreeMemoryMB)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.TotalMemoryMB)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.TotalMemoryMB)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.TotalHandles)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.TotalHandles)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.TotalThreads)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.TotalThreads)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.CDriveTotalMB)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.CDriveTotalMB)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.CDriveFreeMB)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.CDriveFreeMB)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.TcpConnections)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.TcpConnections)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.TotalLogons)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.TotalLogons)%>
                </p>
            </div>
            <h3>
                Date and Time Information</h3>
            <div>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.UTCOffset)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.UTCOffset)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.DST)%>:&nbsp;&nbsp;
                    </label>
                    <%:Model.Result.DST.ToString()%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.DCTime)%>:&nbsp;&nbsp;
                    </label>
                    <%:Model.Result.DCTime.LongDateFriendly()%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.DCTimeUTC)%>:&nbsp;&nbsp;
                    </label>
                    <%:Model.Result.DCTimeUTC.LongDateFriendly()%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.TimeDiff)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.TimeDiff)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.StartupDateTimeUTC)%>:&nbsp;&nbsp;
                    </label>
                    <%:Model.Result.StartupDateTimeUTC.LongDateFriendly()%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.UptimeDays)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.UptimeDays)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.OSInstallDate)%>:&nbsp;&nbsp;
                    </label>
                    <%:Model.Result.OSInstallDate.LongDateFriendly()%>
                </p>
            </div>
            <h3>
                DNS Information</h3>
            <div>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.DNSResponse)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.DNSResponse)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.DNSListenAddresses)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.DNSListenAddresses)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.DNSPublishAddresses)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.DNSPublishAddresses)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.DNSScavengingInterval)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.DNSScavengingInterval)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.DNSQueryReceived)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.DNSQueryReceived)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.DNSResponseSent)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.DNSResponseSent)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.DNSRecursiveQueries)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.DNSRecursiveQueries)%>
                </p>
            </div>
            <h3>
                AD Information</h3>
            <div>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.IsGlobalCatalog)%>:&nbsp;&nbsp;
                    </label>
                    <%:Model.Result.IsGlobalCatalog.ToString()%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.IsPDCEmulator)%>:&nbsp;&nbsp;
                    </label>
                    <%:Model.Result.IsPDCEmulator.ToString()%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.IsInfrastructureManager)%>:&nbsp;&nbsp;
                    </label>
                    <%:Model.Result.IsInfrastructureManager.ToString()%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.IsRIDManager)%>:&nbsp;&nbsp;
                    </label>
                    <%:Model.Result.IsRIDManager.ToString()%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.IsISTG)%>:&nbsp;&nbsp;
                    </label>
                    <%:Model.Result.IsISTG.ToString()%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.DCFlags)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.DCFlags)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.RepInMB)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.RepInMB)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.RepOutMB)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.RepOutMB)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.HighestCommittedUSN)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.HighestCommittedUSN)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.PendingReplicationCount)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.PendingReplicationCount)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.NTDSDitSizeMB)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.NTDSDitSizeMB)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.NeighborCount)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.NeighborCount)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.SysvolReplicationType)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.SysvolReplicationType)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.SysvolMigrationState)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.SysvolMigrationState)%>
                </p>
                <hr />
                <p/>
                    <% if (this.Model.Result.GpRsopHtml != null) { %>
                           <%:Html.ActionLink("Group Policy Report (Html)", "Download",
                               new { @systemInfoId = this.Model.Result.Id, @reportType = "html" },
                               new { title = "Click to download Group Policy report." }) %>

                    <% } %>
                <p/>
                    <% if (this.Model.Result.GpRsopXml != null) { %>
                           <%:Html.ActionLink("Group Policy Report (Xml)", "Download",
                               new { @systemInfoId = this.Model.Result.Id, @reportType = "xml" },
                               new { title = "Click to download Group Policy report." }) %>

                    <% } %>
            </div>
            <h3>
                Roles and Features</h3>
            <div>
                <% foreach (var item in Model.Result.RoleFeatures.ToList().AsFlattenedHierarchy(x => x.FeatureId, x => x.ParentFeatureId)) {
                       string indent = string.Empty;
                       for (int index = 1; index < item.Depth; index++) {
                           indent += "&nbsp;&nbsp;";
                       }
                       if (!string.IsNullOrWhiteSpace(indent)) {
                           indent += "-";
                       }
                       %>
                <p>
                       <%=indent%><%:item.Node.Name %>
                </p>
                  <% } %>
            </div>
            <%if (Model.Result.TimeSyncInfo != null)
              {%>
            <h3>
                TimeSync Test Information</h3>
            <div>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.TimeSyncInfo.Stratum)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.TimeSyncInfo.Stratum)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.TimeSyncInfo.Precision)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.TimeSyncInfo.Precision)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.TimeSyncInfo.RootDelay)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.TimeSyncInfo.RootDelay)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.TimeSyncInfo.RootDispersion)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.TimeSyncInfo.RootDispersion)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.TimeSyncInfo.PollInterval)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.TimeSyncInfo.PollInterval)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.TimeSyncInfo.PhaseOffset)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.TimeSyncInfo.PhaseOffset)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.TimeSyncInfo.ClockRate)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.TimeSyncInfo.ClockRate)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.TimeSyncInfo.StateMachine)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.TimeSyncInfo.StateMachine)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.TimeSyncInfo.TimeSourceFlags)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.TimeSyncInfo.TimeSourceFlags)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.TimeSyncInfo.ServerRole)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.TimeSyncInfo.ServerRole)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.TimeSyncInfo.LastSyncError)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.TimeSyncInfo.LastSyncError)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.TimeSyncInfo.TimeSinceLastGoodSync)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.TimeSyncInfo.TimeSinceLastGoodSync)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.TimeSyncInfo.LastSuccessfulSync)%>:&nbsp;&nbsp;
                    </label>
                    <%:Model.Result.TimeSyncInfo.LastSuccessfulSync.LongDateFriendly()%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.TimeSyncInfo.Source)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.TimeSyncInfo.Source)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.TimeSyncInfo.SourceIPAddress)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.TimeSyncInfo.SourceIPAddress)%>
                </p>
            </div>
            <%} %>
            <%if (Model.Result.GroupPolicySysvolInfo != null)
              {%>
            <h3>
                Group Policy Test Information</h3>
            <div>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.GroupPolicySysvolInfo.DisplayName)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.GroupPolicySysvolInfo.DisplayName)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.GroupPolicySysvolInfo.DirectoryName)%>:&nbsp;&nbsp;
                    </label>
                    <span style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;" title="<%: Html.DisplayFor(model => model.Result.GroupPolicySysvolInfo.DirectoryPath)%>">
                        <%: Html.DisplayFor(model => model.Result.GroupPolicySysvolInfo.DirectoryName)%>
                    </span>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.GroupPolicySysvolInfo.Version)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.GroupPolicySysvolInfo.Version)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.GroupPolicySysvolInfo.ModifiedUTC)%>:&nbsp;&nbsp;
                    </label>
                    <%:Model.Result.GroupPolicySysvolInfo.ModifiedUTC.LongDateFriendly()%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.GroupPolicySysvolInfo.CreatedUTC)%>:&nbsp;&nbsp;
                    </label>
                    <%:Model.Result.GroupPolicySysvolInfo.CreatedUTC.LongDateFriendly()%>
                </p>
            </div>
            <%} %>
            <h3>
                Related Collections</h3>
            <div>
                <%if (Model.Result.ProcessInfos.Count > 0)
                  {%>
                <p>
                    <%:Html.ActionLink("Processes", "Index", "Processes", new { @systemInfoId = Model.Result.Id }, new { onclick = "spinblock();" }) %></p>
                <%} %>
                <%if (Model.Result.ServiceInfos.Count > 0)
                  {%>
                <p>
                    <%:Html.ActionLink("Services", "Index", "Services", new { @systemInfoId = Model.Result.Id }, new { onclick = "spinblock();" }) %></p>
                <%} %>
                <%if (Model.Result.NetstatInfos.Count > 0)
                  {%>
                <p>
                    <%:Html.ActionLink("Ports", "Index", "Ports", new { @systemInfoId = Model.Result.Id }, new { onclick = "spinblock();" })%></p>
                <%} %>
                <%if (Model.Result.InstalledProducts.Count > 0)
                  {%>
                <p>
                    <%:Html.ActionLink("Products", "Index", "Products", new { @systemInfoId = Model.Result.Id }, new { onclick = "spinblock();" }) %></p>
                <%} %>
                <%if (Model.Result.PendingReplicationCount > 0)
                  { %>
                <p>
                    <%:Html.ActionLink("PendingReplications", "PendingReplications", "Replication", new { @systemInfoId = Model.Result.Id }, null)%></p>
                <% } %>
                <%if (Model.Result.ReplicationNeighbors.Count > 0)
                  { %>
                <p>
                    <%:Html.ActionLink("ReplicationNeighbors", "Index", "Replication", new { @systemInfoId = Model.Result.Id }, null)%></p>
                <% } %>
            </div>
        </div>
        <div id="rightcontainer" class="rightcontents" style="width: 400px; border: none;">
            <h3>
                Test Results</h3>
            <div>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.PingTest)%>:&nbsp;&nbsp;
                    </label>
                    <% if (Model.Result.PingTest == TestResult.Fail)
                       {%>
                    <span style="color: Red">
                        <%:Html.DisplayFor(model => model.Result.PingTest)%></span>
                    <%}
                       else
                       {%>
                    <%: Html.DisplayFor(model => model.Result.PingTest)%>
                    <%} %>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.PingRttMs)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.PingRttMs)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.PingLossPct)%>:&nbsp;&nbsp;
                    </label>
                    <%: Html.DisplayFor(model => model.Result.PingLossPct)%>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.LdapBindTest)%>:&nbsp;&nbsp;
                    </label>
                    <% if (Model.Result.LdapBindTest == TestResult.Fail)
                       {%>
                    <span style="color: Red">
                        <%:Html.DisplayFor(model => model.Result.LdapBindTest)%></span>
                    <%}
                       else
                       {%>
                    <%: Html.DisplayFor(model => model.Result.LdapBindTest)%>
                    <%} %>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.LdapSSLBindTest)%>:&nbsp;&nbsp;
                    </label>
                    <% if (Model.Result.LdapSSLBindTest == TestResult.Fail)
                       {%>
                    <span style="color: Red">
                        <%:Html.DisplayFor(model => model.Result.LdapSSLBindTest)%></span>
                    <%}
                       else
                       {%>
                    <%: Html.DisplayFor(model => model.Result.LdapSSLBindTest)%>
                    <%} %>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.GCBindTest)%>:&nbsp;&nbsp;
                    </label>
                    <% if (Model.Result.GCBindTest == TestResult.Fail)
                       {%>
                    <span style="color: Red">
                        <%:Html.DisplayFor(model => model.Result.GCBindTest)%></span>
                    <%}
                       else
                       {%>
                    <%: Html.DisplayFor(model => model.Result.GCBindTest)%>
                    <%} %>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.GCSSLBindTest)%>:&nbsp;&nbsp;
                    </label>
                    <% if (Model.Result.GCSSLBindTest == TestResult.Fail)
                       {%>
                    <span style="color: Red">
                        <%:Html.DisplayFor(model => model.Result.GCSSLBindTest)%></span>
                    <%}
                       else
                       {%>
                    <%: Html.DisplayFor(model => model.Result.GCSSLBindTest)%>
                    <%} %>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.DNSTest)%>:&nbsp;&nbsp;
                    </label>
                    <% if (Model.Result.DNSTest == TestResult.Fail)
                       {%>
                    <span style="color: Red">
                        <%:Html.DisplayFor(model => model.Result.DNSTest)%></span>
                    <%}
                       else
                       {%>
                    <%: Html.DisplayFor(model => model.Result.DNSTest)%>
                    <%} %>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.SysvolTest)%>:&nbsp;&nbsp;
                    </label>
                    <% if (Model.Result.SysvolTest == TestResult.Fail)
                       {%>
                    <span style="color: Red">
                        <%:Html.DisplayFor(model => model.Result.SysvolTest)%></span>
                    <%}
                       else
                       {%>
                    <%: Html.DisplayFor(model => model.Result.SysvolTest)%>
                    <%} %>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.TimeServerTest)%>:&nbsp;&nbsp;
                    </label>
                    <% if (Model.Result.TimeServerTest == TestResult.Fail)
                       {%>
                    <span style="color: Red">
                        <%:Html.DisplayFor(model => model.Result.TimeServerTest)%></span>
                    <%}
                       else
                       {%>
                    <%: Html.DisplayFor(model => model.Result.TimeServerTest)%>
                    <%} %>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.TimeSyncTest)%>:&nbsp;&nbsp;
                    </label>
                    <% if (Model.Result.TimeSyncTest == TestResult.Fail)
                       {%>
                    <span style="color: Red">
                        <%:Html.DisplayFor(model => model.Result.TimeSyncTest)%></span>
                    <%}
                       else
                       {%>
                    <%: Html.DisplayFor(model => model.Result.TimeSyncTest)%>
                    <%} %>
                </p>
                <p>
                    <label>
                        <%: Html.DisplayNameFor(model => model.Result.StrictReplicationTest)%>:&nbsp;&nbsp;
                    </label>
                    <% if (Model.Result.StrictReplicationTest == TestResult.Fail)
                       {%>
                    <span style="color: Red">
                        <%:Html.DisplayFor(model => model.Result.StrictReplicationTest)%></span>
                    <%}
                       else
                       {%>
                    <%: Html.DisplayFor(model => model.Result.StrictReplicationTest)%>
                    <%} %>
                </p>
                <%if (!string.IsNullOrWhiteSpace(this.Model.Result.ErrorMessage))
                  {  %>
                <fieldset>
                    <legend>Errors</legend>
                    <% foreach (var item in this.Model.Result.ErrorMessage.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries))
                       { %>
                    <p title="<%:item%>" style="text-overflow: ellipsis; overflow: hidden;">
                        <%:item%>
                    </p>
                    <%} %>
                </fieldset>
                <%} %>
            </div>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptsSection" runat="server">
    <script type="text/javascript">
        $(document).ready(function () {
            $("#leftcontainer").accordion({
                active: 7,
                heightStyle: "content",
                collapsible: true
            });
            $("#rightcontainer").accordion({
                heightStyle: "content"
            });
        });
    </script>
</asp:Content>
